package com.zonski.jbots.engine.entity;

import com.zonski.jbots.engine.Entity;
import com.zonski.jbots.engine.Engine;
import com.zonski.jbots.engine.CollisionData;
import com.zonski.jbots.engine.Modes;

public class AbstractMind implements Mind
{
    private Entity entity;

    public AbstractMind()
    {
    }

    public void update(Engine engine)
        throws Exception
    {
        // if it's dead, get rid of it
        if(this.getEntity().getMode() == Modes.DEAD)
        {
            this.getEntity().setRemovable(true);
        }
    }

    public final Entity getEntity()
    {
        return this.entity;
    }

    public final void setEntity(Entity entity)
    {
        this.entity = entity;
    }

    public void collision(Engine engine, CollisionData data)
    {
        // defaults to doing nothing
    }

    public Mind copy()
    {
        return new AbstractMind();
    }
}
